Skip to content

Conversation

@ngholiza
Copy link
Collaborator

Summary

  • Edit templates in place. The Unit Experiments library has a new Edit button, shown only to the template's owner or an admin (the same rule the backend enforces). It opens /experiment/new?edit_type=<id>, and saving goes through the existing PATCH /equipment/experiment-type/{id} as a new version, with an optional change summary. Before this, "Run / Edit" always saved a copy; that button is now "Run / Copy".
  • Safe editing. The equipment is locked during an edit, and saving is blocked until the template has loaded, so a half-loaded form can't overwrite it. The author name and email are carried over. Equipment parameters added since the template was saved appear as "not used".
  • New units. h, °C/min and ° are added to the equipment registration list. Furnace heating and cooling rates were stuck on "N/A", and XRD 2θ and step size had no unit.

Why

The MAX legacy XRD experiment needs new inputs (Composition, Researcher) and XRD outputs, but templates couldn't be edited from the UI. Tyriq also needs °C/min for the tube furnaces.

Testing

  • tsc --noEmit, eslint and next build pass.
  • Codex review approved both commits. It found two issues in the first version, both fixed: saving before the template loaded could overwrite it, and edits erased the author fields.
  • The web app has no automated tests, and the new flow hasn't been clicked through in a browser yet.

Deploy

Front-end only: a web image build plus kubectl set image on dt-web. No migration, no API change.

🤖 Generated with Claude Code

The library's "Run / Edit" opened the template in the create form, so any
edit saved a copy. A new Edit button (owner or admin, matching the backend
rule) opens /experiment/new?edit_type=<id>, which saves through the existing
PATCH endpoint as a new version with an optional change summary. The
equipment is locked, saving waits until the template has loaded, author
fields are carried over, and equipment parameters added since the template
was saved appear as "not used". The old button is renamed "Run / Copy".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Furnace heating and cooling rates had to be registered as "N/A" because the
unit list had no °C/min; hours and degrees (XRD 2-theta and step size) were
also missing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant